package com.zhledu.datastructure.exam;

import java.util.Scanner;

public class Fab {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
       // int num = scanner.nextInt();
        for(int num=101;num<=999;num++) {
            int g = num % 10;
            int s = num / 10 % 10;
            int b = num / 100;
            if(g * g * g + s * s * s + b * b * b == num)
            {
                System.out.println(num);
            }
        }
    }
}
